body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #222;
    color: #eee;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #333;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 900px;
    align-items: center;
}

h1 {
    color: #0f0;
    text-align: center;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
}

textarea {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #444;
    color: #eee;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    resize: vertical;
}

.buttons {
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #0a0;
    color: white;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0c0;
}

canvas {
    background-color: #111;
    border: 1px solid #555;
    border-radius: 5px;
    width: 100%;
    max-width: 800px;
    display: block; /* Remove extra space below canvas */
}

/* New styles for sample rate selector */
.sample-rate-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #eee;
}

.sample-rate-selector label {
    font-size: 16px;
}

/* New styles for mode selector - similar to sample rate */
.mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #eee;
}

.mode-selector label {
    font-size: 16px;
}

/* New styles for sample selector - similar to sample rate/mode */
.sample-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #eee;
}

.sample-selector label {
    font-size: 16px;
}

select {
    padding: 8px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #444;
    color: #eee;
    font-size: 14px;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23eee" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #0c0;
}

.error-message {
    color: red;
    text-align: center;
    margin-bottom: 10px;
    min-height: 20px; /* Reserve space to prevent layout shifts */
    font-weight: bold;
}

#exoticFunctionInfo {
    width: 100%;
    max-width: 800px;
    margin-top: 30px;
    padding: 20px;
    background-color: #2b2b2b;
    border-radius: 8px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
    color: #ccc;
}

#exoticFunctionInfo h2 {
    color: #0f0;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.5em;
}

#exoticFunctionInfo .function-entry {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #444;
}

#exoticFunctionInfo .function-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#exoticFunctionInfo .function-name {
    color: #0a0;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1em;
    margin-bottom: 5px;
}

#exoticFunctionInfo .function-description {
    font-size: 0.95em;
    line-height: 1.4;
}